package com.km.app.domain.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

@ApiModel("文件")
public class FileVO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "文件id")
    private String  id;
    @ApiModelProperty(value = "appId")
    private String  appId;
    @ApiModelProperty(value = "文件路径")
    private String path;
    @ApiModelProperty(value = "文件名称")
    private String name;
    @ApiModelProperty(value = "文件大小")
    private long size;
    @ApiModelProperty(value = "文件全路径")
    private String fullPath;


    public FileVO() {
        super();
    }

    public FileVO(String id, String appId,String name, String path, long size) {
        super();
        this.id = id;
        this.appId = appId;
        this.name = name;
        this.path = path;
        this.size = size;
    }


    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFullPath() {
        String fullPath =  appId + "/" + path + "/" + name;
        return fullPath.replaceAll("//","/");
    }
}
